__autho__ = '付鹏飞'


class anaimal:

    def __init__(self, name, sex, age):
        self.__int__(name, age)
        self.sex = sex

    def __int__(self, name, age):
        self.name = name
        self.age = age

    '''
    self 参数是对类的当前实例的引用，用于访问属于该类的变量。
    '''

    def get_message(self):
        print("name:%s,age:%s,sex:%s" % (self.name, self.age, self.sex))


if __name__ == "__main__":
    # dog = anaimal(name="dog", sex="male", age=2)
    dog = anaimal(name="dog", age=2, sex="male")
    dog.get_message()
